﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="OrderStateControl.ascx.cs" Inherits="User_Controls_OrderStateControl" %>
<%@ Import Namespace="Active.Core" %>
<h2>订单信息</h2>
<asp:FormView ID="OrderFormView" DataSourceID="OrderDataSource" runat="server">
<ItemTemplate>
<ul>
    <li>
    <span>所属清单:</span>
    <asp:HyperLink ID="HyperLink2" NavigateUrl='<%# Eval("BillId", "~/Bill/Bill.aspx?id={0}") %>' 
        Enabled='<%# Bill.CanGetObject() %>'
        runat="server"><%# ((Bill)Eval("Bill")).Number%></asp:HyperLink>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <span>订单号:</span>
    <span><%# Eval("Number") %></span>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <span>产品:</span>
    <asp:HyperLink ID="HyperLink1" 
    NavigateUrl='<%# string.Format("~/Customer/Customer.aspx?id={0}", ((Bill)Eval("Bill")).CustomerId) %>' 
        runat="server"><%# ((Bill)Eval("Bill")).ProductName %></asp:HyperLink>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <span>播放版本:</span>
    <span><%# Formater.PlayVersions(Eval("PlayVersions") as string[]) %></span>
    </li>
    <li>
    <span>媒介:</span>
    <asp:HyperLink ID="HyperLink3" NavigateUrl='<%# Eval("MediaId", "~/Media/Media.aspx?id={0}") %>' 
        runat="server"><%# Eval("MediaName") %></asp:HyperLink>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <span>媒介类型:</span>
    <span><%# Formater.MediaType(((Media)Eval("Media")).Category) %></span>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <span>广告周期:</span>
    <span><%# Eval("StartDate", "{0:yyyy-M-d}") +"~"+ Eval("EndDate", "{0:yyyy-M-d}") %></span>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="Label13" runat="server" Text="工作状态:"></asp:Label>
    <span class="state"><%# Formater.GetStateText(Eval("StateValue")) %></span>
    </li>
</ul>
</ItemTemplate>
</asp:FormView>
<csla:CslaDataSource ID="OrderDataSource" runat="server" 
    TypeName="Active.Core.Order, Active.Core"
    TypeSupportsPaging="False" TypeSupportsSorting="False" 
    OnSelectObject="OrderDataSource_SelectObject">
</csla:CslaDataSource>